﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Classes.util {
    import com.adobe.crypto.*;

    public class PseudoRandomNumberGenerator {

        protected var m_prefix:String = "PADDING";
        protected var m_value:int;

        public function PseudoRandomNumberGenerator(_arg1:int=0){
            this.m_value = _arg1;
        }
        public function next():int{
            var _local1:String = (this.m_prefix + this.m_value.toString(16));
            var _local2:String = ("0x" + MD5.hash(_local1).substring(0, 8));
            this.m_value = int(_local2);
            return (this.m_value);
        }
        public function get current():int{
            return (this.m_value);
        }
        public function set current(_arg1:int):void{
            this.m_value = _arg1;
        }
        public function nextInRange(_arg1:int, _arg2:int=0):int{
            var _local3:int = (_arg1 - _arg2);
            var _local4:int = this.next();
            var _local5:int = (Math.abs((_local4 % _local3)) + _arg2);
            return (_local5);
        }

    }
}//package Classes.util 
